﻿@model ContactManagement.Models.CategoriesAddModel

@{
    ViewBag.Title = Html.Categories().GetCategoriesPageTitle();
}

<h2>@Html.Categories().GetCategoriesPageTitle()</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@Html.Categories().GetCategoriesElementTitle()</legend>

	<div class="view-item">
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
	</div>
	<div class="clear-all">
	<div class="view-item">
        <div class="editor-label">
            @Html.LabelFor(model => model.SortId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SortId)
            @Html.ValidationMessageFor(model => model.SortId)
        </div>
	</div>
	<div class="clear-all">
        <p>
        <br />
            <input type="submit" value="@Resources.Navigation.SaveChangesRESX" />
        </p>
    </fieldset>
}

<div>
           @Html.RouteLink(Resources.Navigation.BackToListRESX, RouteNames.Categories.ToString(), 
                            new { controller = EControllers.Administration.ToString(), category = ViewContext.RouteData.GetRequiredString(WebConstants.CategoryString), action = EActionAdministration.CategoriesList.ToString() }) 
</div>
